<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>预约服务设置</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  {include file="public/css"/}
</head>
<body>
  <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
      <div class="layui-card layui-col-md12">
				<div class="layui-card-header"><i class="fa fa-cog"></i> 预约服务设置</div>
				<div class="layui-card-body" pad15>
					<div class="layui-form" lay-filter="">
						<!-- <div class="layui-form-item">
							<label class="layui-form-label" style="width:130px">系统状态：</label>
							<div class="layui-input-inline">
								<input type="radio" name="info[status]" value="1" {if $info['status']==1}checked{/if} title="开启" lay-filter="status"/>
								<input type="radio" name="info[status]" value="0" {if $info['status']==0}checked{/if} title="关闭" lay-filter="status"/>
							</div>
						</div> -->
						
						<div class="layui-form-item">
							<label class="layui-form-label" style="width:130px">派单模式：</label>
							<div class="layui-input-inline" style="width:500px">
								<input type="radio" name="info[paidantype]" value="0" title="服务人员抢单" {if $info['paidantype']==0}checked{/if} lay-filter="paidantype">
								<input type="radio" name="info[paidantype]" value="1" title="指定服务人员" {if $info['paidantype']==1}checked{/if} lay-filter="paidantype">
							</div>
						</div>


						<div class="layui-form-item" id="autopaidan" {if $info && $info['paidantype']==1}style="display:none"{/if}>
							<label class="layui-form-label" style="width:130px">自动派单：</label>
							<div class="layui-input-inline">
								<input type="radio" name="info[isautopd]" value="1" title="开启" {if $info['isautopd']==1}checked{/if} >
								<input type="radio" name="info[isautopd]" value="0" title="关闭" {if $info['isautopd']==0}checked{/if} >
							</div>
							<div class="layui-form-mid layui-word-aux">开启后，订单自动到抢单大厅，无需后台进行派单</div>
						</div>


						<div class="layui-form-item">
							<label class="layui-form-label" style="width:130px">提现方式：</label>
							<div class="layui-input-inline" style="width:400px">
								<input type="checkbox" name="info[withdraw_weixin]" title="微信钱包" value="1" {if $info['withdraw_weixin']==1}checked{/if} lay-skin="primary">
								<input type="checkbox" name="info[withdraw_aliaccount]" title="支付宝" value="1" {if $info['withdraw_aliaccount']==1}checked{/if} lay-skin="primary"/>
								<input type="checkbox" name="info[withdraw_bankcard]" title="银行卡" value="1" {if $info['withdraw_bankcard']==1}checked{/if} lay-skin="primary"/>
							</div>
							<div class="layui-form-mid layui-word-aux">提现到微信钱包需开通企业付款到零钱功能</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label" style="width:130px">提现最小金额：</label>
							<div class="layui-input-inline" style="width:120px">
								<input type="text" name="info[withdrawmin]" value="{$info['withdrawmin']}" class="layui-input"/>
							</div>
							<div class="layui-form-mid">元</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label" style="width:130px">提现手续费：</label>
							<div class="layui-input-inline" style="width:120px">
								<input type="text" name="info[withdrawfee]" value="{$info['withdrawfee']}" class="layui-input"/>
							</div>
							<div class="layui-form-mid">%</div>
						</div>
							<!-- <div class="layui-form-item">
								<label class="layui-form-label" style="width:130px">人员名称：</label>
								<div class="layui-input-inline" style="width:120px">
									<input type="text" name="info[diyname]" value="{$info['diyname']}" class="layui-input"/>
								</div>
								<div class="layui-form-mid">自定义人员名称，如：师傅、工人</div>
							</div> -->
			
							<div class="layui-form-item">
								<label class="layui-form-label" style="width:130px">自动关闭订单：</label>
								<div class="layui-input-inline">
									<input type="text" name="info[autoclose]" lay-verify="required" lay-verType="tips" class="layui-input" value="{$info.autoclose}">
								</div>
								<div class="layui-form-mid">分钟</div>
								<div class="layui-form-mid layui-word-aux" style="margin-left:10px;">下单后多久不支付自动关闭订单，释放占用的库存</div>
							</div>
							{if getcustom('hmy_yuyue')}

							<div class="layui-form-item">
								<label class="layui-form-label" style="width:130px">退款设置：</label>
								<div class="layui-input-inline" style="width: 100px;">
									<input style="border-radius:0 2px 2px 0" type="text" name="info[minminute]" class="layui-input" value="{$info.minminute}">
								</div>
								<div class="layui-form-mid">分钟内，没有接单自动退款</div>
								<div class="layui-form-mid layui-word-aux" style="margin-left:10px;">设置时间，N分钟内未接单自动退款，接单后不允许退款</div>
							</div>

							<div class="layui-form-item">
								<label class="layui-form-label" style="width:130px">接入师傅app：</label>
								<div class="layui-input-inline">
									<input type="radio" name="info[isapi]" value="1" title="开启" {if $info['isapi']==1}checked{/if} lay-filter="apitype">
									<input type="radio" name="info[isapi]" value="0" title="关闭" {if $info['isapi']==0}checked{/if} lay-filter="apitype">
								</div>
								<div class="layui-form-mid layui-word-aux">开启后，师傅列表将获取第三方</div>
							</div>
							<div id="apicontent"  {if !$info['isapi']} style="display:none"{/if}>
								<div class="layui-form-item">
									<label class="layui-form-label"  style="width:130px">项目主图：</label>
									<input type="hidden" name="info[pic]" id="pic" lay-verType="tips" class="layui-input" value="{$info['pic']}">
									<button style="float:left;" type="button" class="layui-btn layui-btn-primary" upload-input="pic" upload-preview="picPreview" onclick="uploader(this)">上传图片</button>
									<div class="layui-form-mid layui-word-aux" style="margin-left:10px;">建议尺寸：640×640像素</div>
									<div id="picPreview" style="float:left;padding-top:10px;padding-left:160px;clear: both;">
										<div class="layui-imgbox" style="width:130px;"><div class="layui-imgbox-img"><img src="{$info['pic']}"/></div></div>
									</div> 
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label"  style="width:130px">项目详情：</label>
									<input type="hidden" name="info[detailpic]" id="detailpic" lay-verType="tips" class="layui-input" value="{$info['detailpic']}">
									<button style="float:left;" type="button" class="layui-btn layui-btn-primary" upload-input="detailpic" upload-preview="picPreview1" onclick="uploader(this)">上传图片</button>
									<div class="layui-form-mid layui-word-aux" style="margin-left:10px;">建议尺寸：640×640像素</div>
									<div id="picPreview1" style="float:left;padding-top:10px;padding-left:160px;clear: both;">
										<div class="layui-imgbox" style="width:130px;"><div class="layui-imgbox-img"><img src="{$info['detailpic']}"/></div></div>
									</div> 
								</div>

								<div class="layui-form-item">
									<label class="layui-form-label"  style="width:130px">项目介绍：</label>
									<div class="layui-input-inline" style="width:400px">
										<input type="text" name="info[desc]" class="layui-input" value="{$info['desc']}">
									</div>
									<div class="layui-form-mid layui-word-aux">在师傅详情页展示项目简介，建议30字以内</div>
								</div>

								<div class="layui-form-item">
									<label class="layui-form-label"  style="width:130px">可预约时间：</label>
									<div class="layui-input-inline" style="width:500px">
										<input type="radio" name="info[datetype]" value="1" title="时间段" {if !$info['datetype'] || $info['datetype']==1}checked{/if} lay-filter="datetype">
										<input type="radio" name="info[datetype]" value="2" title="时间点" {if $info['datetype']==2}checked{/if} lay-filter="datetype">
									</div>
								</div>
									<div  id="datebox1" style="{if $info['datetype'] && $info['datetype']!=1}display:none{/if}">
										<div class="layui-form-item">
											<label class="layui-form-label"  style="width:130px">设置时间段：</label>
											<div class="layui-form-mid">早</div>
											<div class="layui-input-inline" style="width: 100px;">
												<input style="border-radius:0 2px 2px 0" type="text" name="info[zaohour]" class="layui-input" value="{$info.zaohour?$info.zaohour:'7'}">
											</div>
											<div class="layui-form-mid">时；晚</div>
											<div class="layui-input-inline" style="width: 100px;">
												<input style="border-radius:0 2px 2px 0" type="text" name="info[wanhour]" class="layui-input" value="{$info.wanhour?$info.wanhour:'18'}">
											</div>
											<div class="layui-form-mid">时</div>
										</div>
										<div class="layui-form-item">
											<label class="layui-form-label"  style="width:130px">时间间隔：</label>
											<div class="layui-input-inline">
												<input type="text" name="info[timejg]" value="{$info['id']?$info['timejg']:'30'}" class="layui-input">
											</div>
												<div class="layui-form-mid layui-word-aux">分钟</div>
										</div>
									</div>
									<div  id="datebox2" style="{if $info['datetype']!=2}display:none{/if}">
										{if $info['datetype']==2 && $info['timepoint']}
										<div id="timedata">
											{foreach $info['timepoint'] as $k=>$t}
											<div class="layui-form-item">
												<label class="layui-form-label"  style="width:130px">{if $k==0}选择时间点：{/if}</label>										
													<div class="layui-input-inline">
														<input type="text" name="info[timepoint][]" value="{$t}"  class="layui-input timepoint">	
													</div>
													{if $k==0}
													<button class="layui-btn layui-btn-primary" onclick="addtime()"><i class="fa fa-plus"></i></button>
													{else}
													<button class="layui-btn layui-btn-primary" onclick="removetime(this)"><i class="fa fa-minus"></i></button>
													{/if}
											</div>
											{/foreach}
										</div>
										{else}
										<div id="timedata">
											<div class="layui-form-item">
												<label class="layui-form-label"  style="width:130px">选择时间点：</label>
												<div class="layui-input-inline">
													<input type="text" name="info[timepoint][]" value="00:00"  class="layui-input timepoint">	
												</div>
												{if $k==0}
												<button class="layui-btn layui-btn-primary" onclick="addtime()"><i class="fa fa-plus"></i></button>
												{else}
												<button class="layui-btn layui-btn-primary" onclick="removetime(this)"><i class="fa fa-minus"></i></button>
												{/if}
											</div>
										</div>	
										{/if}
									</div>
									<div class="layui-form-item"  >
										<label class="layui-form-label"  style="width:130px">可预约日期：</label>
										<div class="layui-input-inline" style="width:500px">
											<input type="radio" name="info[rqtype]" value="1" title="按周期" {if !$info['rqtype'] || $info['rqtype']==1}checked{/if} lay-filter="rqtype">
											<input type="radio" name="info[rqtype]" value="2" title="按时间" {if $info['rqtype']==2}checked{/if} lay-filter="rqtype">
										</div>
									</div>
									<div class="layui-form-item"  id="yydatebox1" style="{if $info['rqtype'] && $info['rqtype']!=1}display:none{/if}">
										<label class="layui-form-label"  style="width:130px">预约周期：</label>
										<div class="layui-input-inline" style="width:600px">
												<input type="checkbox" name="info[yyzhouqi][]" {if in_array(1,$info['yyzhouqi'])}checked{/if} value="1"  title="周一" lay-skin="primary">
												<input type="checkbox" name="info[yyzhouqi][]" {if in_array(2,$info['yyzhouqi'])}checked{/if} value="2"  title="周二" lay-skin="primary">
												<input type="checkbox" name="info[yyzhouqi][]" {if in_array(3,$info['yyzhouqi'])}checked{/if} value="3"  title="周三" lay-skin="primary">
												<input type="checkbox" name="info[yyzhouqi][]" {if in_array(4,$info['yyzhouqi'])}checked{/if} value="4"  title="周四" lay-skin="primary">
												<input type="checkbox" name="info[yyzhouqi][]" {if in_array(5,$info['yyzhouqi'])}checked{/if} value="5"  title="周五" lay-skin="primary">
												<input type="checkbox" name="info[yyzhouqi][]" {if in_array(6,$info['yyzhouqi'])}checked{/if} value="6"  title="周六" lay-skin="primary">
												<input type="checkbox" name="info[yyzhouqi][]" {if in_array(0,$info['yyzhouqi'])}checked{/if} value="0"  title="周日" lay-skin="primary">
										</div>
										<!-- <div class="layui-form-mid layui-word-aux"><a href="groupadd.php">创建分组</a></div> -->
									</div>
									<div class="layui-form-item"  id="yydatebox2" style="{if $info['rqtype']!=2}display:none{/if}">
										<label class="layui-form-label"  style="width:130px">选择日期：</label>
										<div class="layui-input-inline" style="width:600px">
											<div class="layui-input-inline" style="width:150px">
												<input type="text" name="info[yybegintime]" class="layui-input" value="{$info.yybegintime}" id="yybegintime" autocomplete="off">
											</div>
											<div class="layui-form-mid">到</div>
											<div class="layui-input-inline" style="width:150px">
												<input type="text" name="info[yyendtime]" class="layui-input" value="{$info.yyendtime}" id="yyendtime" autocomplete="off">
											</div>
											<div class="layui-form-mid layui-word-aux" style="clear:left;margin-left:110px"></div>	
										</div>
										<!-- <div class="layui-form-mid layui-word-aux"><a href="groupadd.php">创建分组</a></div> -->
									</div>
									<div class="layui-form-item">
										<label class="layui-form-label"  style="width:130px">可选条件：</label>
										<div class="layui-form-mid">下单时间大于可选时间</div>
										<div class="layui-input-inline" style="width:70px">
											<input type="text" name="info[pdprehour]" value="{if !$info['id']}4{else}{$info['pdprehour']}{/if}" class="layui-input">
										</div>
										<div class="layui-form-mid">小时</div>
									</div>	
								</div>
							{/if}
							{if $bid == 0}
							<div class="layui-form-item">
								<label class="layui-form-label" style="width:130px">会员折扣：</label>
								<div class="layui-input-inline" style="width:350px">
									<input type="radio" name="info[discount]" value="1" title="开启" {if $info['discount']==1}checked{/if}>
									<input type="radio" name="info[discount]" value="0" title="关闭" {if $info['discount']==0}checked{/if}>
								</div>
								<div class="layui-form-mid layui-word-aux">是否开启会员折扣</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label" style="width:130px">{:t('优惠券')}抵扣：</label>
								<div class="layui-input-inline" style="width:350px">
									<input type="radio" name="info[iscoupon]" value="1" title="开启" {if $info['iscoupon']==1}checked{/if}>
									<input type="radio" name="info[iscoupon]" value="0" title="关闭" {if $info['iscoupon']==0}checked{/if}>
								</div>
								<div class="layui-form-mid layui-word-aux">是否开启{:t('优惠券')}抵扣</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label" style="width:130px">评价审核：</label>
								<div class="layui-input-inline">
									<input type="radio" name="info[comment_check]" value="1" {if $info['comment_check']==1}checked{/if} title="开启" lay-filter="comment_check"/>
									<input type="radio" name="info[comment_check]" value="0" {if $info['comment_check']==0}checked{/if} title="关闭" lay-filter="comment_check"/>
								</div>
								<div class="layui-form-mid layui-word-aux" style="margin-left:10px;">关闭后用户的评价将直接显示,不需要后台审核</div>
							</div>
							{/if}
							{if getcustom('businessindex_showfw')}
							<div class="layui-form-item">
								<label class="layui-form-label" style="width:130px">人员表单链接：</label>
								<div class="layui-input-inline">
									<input type="text" name="info[formurl]" id="formurl" class="layui-input" value="{$info.formurl}">
								</div>
								<div class="layui-btn layui-btn-primary" style="float:left" onclick="chooseUrl2('formurl')">选择链接</div>
							</div>
							{/if}
					{if getcustom('yuyue_douyin_video') && $bid==0}
					<div class="layui-form-item">
						<label class="layui-form-label" style="width:130px">弹窗广告：</label>
						<div class="layui-input-inline" style="width:350px">
							<input type="radio" name="info[ad_status]" value="1" title="开启" {if $info['ad_status']==1}checked{/if} lay-filter="diandaSwitch">
							<input type="radio" name="info[ad_status]" value="0" title="关闭" {if $info['ad_status']==0}checked{/if} lay-filter="diandaSwitch">
						</div>
						<div class="layui-form-mid layui-word-aux">商品详情页是否开启弹窗广告</div>
					</div>
					<div diandaSwitch="info[ad_status]" {if !$info['ad_status']} style="display:none"{/if}>
						<div class="layui-form-item">
							<label class="layui-form-label"  style="width:130px">广告图片：</label>
							<input type="hidden" name="info[ad_pic]" id="ad_pic" lay-verType="tips" class="layui-input" value="{$info['ad_pic']}">
							<button style="float:left;" type="button" class="layui-btn layui-btn-primary" upload-input="ad_pic" upload-preview="ad_picPreview" onclick="uploader(this)">上传图片</button>
							<div class="layui-form-mid layui-word-aux" style="margin-left:10px;">建议尺寸：640×640像素</div>
							<div id="ad_picPreview" style="float:left;padding-top:10px;padding-left:160px;clear: both;">
								<div class="layui-imgbox" style="width:130px;"><div class="layui-imgbox-img"><img src="{$info['ad_pic']}"/></div></div>
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label" style="width:130px">广告链接：</label>
							<div class="layui-input-inline">
								<input type="text" name="info[ad_link]" id="ad_link" class="layui-input" value="{$info.ad_link}">
							</div>
							<div class="layui-btn layui-btn-primary" style="float:left" onclick="chooseUrl2('ad_link')">选择链接</div>
						</div>
					</div>
					{/if}
					{if getcustom('yuyue_douyin_video') && $bid==0}
					<div class="layui-form-item">
						<label class="layui-form-label" style="width:130px">抖音发视频：</label>
						<div class="layui-input-inline" style="width:350px">
							<input type="radio" name="info[video_status]" value="1" title="开启" {if $info['video_status']==1}checked{/if} lay-filter="diandaSwitch">
							<input type="radio" name="info[video_status]" value="0" title="关闭" {if $info['video_status']==0}checked{/if} lay-filter="diandaSwitch">
						</div>
						<div class="layui-form-mid layui-word-aux">是否开启抖音发视频</div>
					</div>
					<div diandaSwitch="info[video_status]" {if !$info['video_status']} style="display:none"{/if}>
					  <div class="layui-form-item">
						  <label class="layui-form-label" style="width:130px">视频话题：</label>
						  <div class="layui-input-inline" style="width:300px">
							  <input type="text" name="info[video_tag]" class="layui-input" value="{$info.video_tag}">
						  </div>
						  <div class="layui-form-mid layui-word-aux">多个话题使用英文“,”间隔</div>
					  </div>
					  <div class="layui-form-item">
						  <label class="layui-form-label" style="width:130px">发视频锚点文字：</label>
						  <div class="layui-input-inline" style="width:300px">
							  <input type="text" name="info[video_title]" class="layui-input" value="{$info.video_title}">
						  </div>
					  </div>
					</div>
					{/if}
					{if getcustom('yuyue_tips')}
					<div class="layui-form-item">
					  <label class="layui-form-label" style="width:130px">预约成功文字：</label>
					  <div class="layui-input-inline" style="width:300px">
						  <input type="text" name="info[yuyue_success]" class="layui-input" value="{$info.yuyue_success}">
					  </div>
					  <div class="layui-form-mid layui-word-aux">0元预约成功提示</div>
					</div>
					{/if}

						<div class="layui-form-item">
						  <label class="layui-form-label" style="width:130px">预约数量文本：</label>
						  <div class="layui-input-inline" style="width:300px">
							  <input type="text" name="info[yuyue_numtext]" class="layui-input" value="{$info.yuyue_numtext}">
						  </div>
						  <div class="layui-form-mid layui-word-aux">预约详情页预约数量自定义文字</div>
						</div>
							<!--<div class="layui-form-item">
								<label class="layui-form-label" style="width:100px">商家费率：</label>
								<div class="layui-input-inline" style="width:120px">
									<input type="text" name="info[businessfee]" value="{$info['businessfee']}" class="layui-input"/>
								</div>
								<div class="layui-form-mid">%</div>
								<div class="layui-form-mid layui-word-aux">商家使用平台时加收配送员提成的百分之多少</div>
							</div>
							-->
							{if getcustom('yuyue_apply') || getcustom('yuyue_apply_refund')}
								<span style="color:#333">申请设置</span><hr/>
								<div class="layui-form-item" style="margin-bottom:0" id="applyprice">
									<label class="layui-form-label" style="width:130px">申请费用：</label>
									<div class="layui-input-inline">
										<input type="text" name="info[apply_paymoney]" class="layui-input" value="{$info.apply_paymoney}">
									</div>
									<div class="layui-form-mid ">元</div>
									<div class="layui-form-mid layui-word-aux" style="clear:left;margin-left:160px">提交申请时需要支付的金额,0代表免费申请</div>
								</div>
								{if !getcustom('yuyue_apply_refund')}
								<div class="layui-form-item" style="margin-bottom:0" id="applyprice">
									<label class="layui-form-label" style="width:130px">签到范围：</label>
									<div class="layui-input-inline">
										<input type="text" name="info[sign_juli]" class="layui-input" value="{$info.sign_juli}">
									</div>
									<div class="layui-form-mid ">KM</div>
									<div class="layui-form-mid layui-word-aux" style="clear:left;margin-left:160px">师傅服务时，签到打卡的范围</div>
								</div>
								{/if}
								<div class="layui-form-item">
									<label class="layui-form-label" style="width:130px">入驻协议：</label>
									<div class="layui-input-inline" style="width:500px">
										<input type="radio" name="info[xieyi_show]" value="0" title="关闭" {if !$info['id'] || $info['xieyi_show']==0}checked{/if}/>
										<input type="radio" name="info[xieyi_show]" value="1" title="开启" {if $info['xieyi_show']==1}checked{/if}/>
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label" style="width:130px">跳转链接：</label>
									<div class="layui-input-inline">
										<input type="text" name="info[apply_url]" id="apply_url" class="layui-input" value="{$info.apply_url}">
									</div>
									<div class="layui-btn layui-btn-primary" style="float:left" onclick="chooseUrl2('apply_url')">选择链接</div>
									<div class="layui-form-mid layui-word-aux" style="clear:left;margin-left:160px">填写完入驻资料后，跳转的连接</div>
								</div>
								<!-- 详情编辑器 -->
								<div class="layui-form-item">
									<label class="layui-form-label" style="width:130px">入驻协议内容：</label>
									<div class="layui-input-inline" style="width:500px">
										<script id="xieyi" name="info[xieyi]" type="text/plain" style="width:100%;height:500px">{$info.xieyi}</script>
									</div>
								</div>
							
							{/if}

						<div class="layui-form-item">
							<div class="layui-input-block" style="margin-left:160px;">
								<button class="layui-btn" lay-submit lay-filter="formsubmit">提 交</button>
							</div>
						</div>
					</div>
				</div>
			</div>
    </div>
  </div>
	{include file="public/js"/}
	<script>
	{if getcustom('yuyue_apply')}
	var xieyi = UE.getEditor('xieyi');
	{/if}

	layui.form.on('radio(paidantype)', function(data){
		if(data.value == '1'){
			$('#autopaidan').hide();
		}else{
			$('#autopaidan').show();
		}
	})

	layui.form.on('radio(datetype)', function(data){
		if(data.value == '1'){
			$('#datebox2').hide();
			$('#datebox1').show();
		}else{
			$('#datebox2').show();
			$('#datebox1').hide();
		}
	})
	layui.form.on('radio(apitype)', function(data){
		if(data.value == '1'){
			$('#apicontent').show();
		}else{
			$('#apicontent').hide();
		}
	})
	layui.form.on('radio(jiesuantype)', function(data){
		if(data.value == '1'){
			$('#jiesuantype0_div').hide();
			$('#jiesuantype1_div').show();
		}else{
			$('#jiesuantype0_div').show();
			$('#jiesuantype1_div').hide();
		}
	})
	layui.form.on('radio(rqtype)', function(data){
		if(data.value == '1'){
			$('#yydatebox2').hide();
			$('#yydatebox1').show();
		}else{
			$('#yydatebox2').show();
			$('#yydatebox1').hide();
		}
	})
	layui.form.on('submit(formsubmit)', function(obj){
		var field = obj.field
		{if getcustom('yuyue_apply')}
		field['info[xieyi]'] = xieyi.getContent();
		{/if}
		if(!field['info[withdraw_weixin]'])  field['info[withdraw_weixin]'] = 0
		if(!field['info[withdraw_bankcard]'])  field['info[withdraw_bankcard]'] = 0
		if(!field['info[withdraw_aliaccount]'])  field['info[withdraw_aliaccount]'] = 0
		$.post("{:url('save')}",field,function(data){
			dialog(data.msg,data.status,data.url);
		})
	})

		function toup(obj){
		var onthis=$(obj).parent().parent();  
		var getUp=onthis.prev();
		if (getUp.length<=0)  {  
			layer.msg("到顶了");  
			return;  
		}  
		onthis.after(getUp);  
	}
	function todown(obj){
		var onthis=$(obj).parent().parent();  
		var getdown=onthis.next();
		if (getdown.length<=0){  
			layer.msg("到底了");  
			return;  
		}
		getdown.after(onthis);
	}

	var chooseUrlField = '';
	function chooseUrl2(field){
		chooseUrlField = field;
		layer.open({type:2,shadeClose:true,area:['1100px', '650px'],'title':'选择链接',content:"{:url('DesignerPage/chooseurl')}&callback=chooseLink2"});
	}
	function chooseLink2(urlname,url){
		$("#"+chooseUrlField).val(url);
	}
  </script>
	{include file="public/copyright"/}
</body>
</html>